import Vue from "vue";
import VueRouter from "vue-router";
// import Home from "../views/Home.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "",
    component: () => import("../views/Layout.vue"),
    children: [
      {
        path: "",
        name: "Dashboard",
        component: () => import("../views/Dashboard.vue"),
        meta: {
          title: "数据看板",
        },
      },
      {
        path: "cluster",
        name: "Cluster",
        component: () => import("../views/Cluster.vue"),
        meta: {
          title: "集群管理",
          module: "容器管理",
        },
        children: [],
      },
      {
        path: "nodes",
        name: "Nodes",
        component: () => import("../views/Nodes.vue"),
        meta: {
          title: "节点管理",
          module: "容器管理",
        },
        children: [],
      },
    ],
  },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
